package org.zhadoop.stream.cql.semanticanalyzer.analyzecontext;

import java.util.List;

import org.zhadoop.stream.api.streams.Schema;
import org.zhadoop.stream.cql.exception.SemanticAnalyzerException;
import org.zhadoop.stream.cql.semanticanalyzer.ConstUtils;
import org.zhadoop.stream.cql.semanticanalyzer.parser.context.ParallelClauseContext;
import org.zhadoop.stream.cql.semanticanalyzer.parser.context.ParseContext;

/**
 * 并发度解析子句语义分析内容
 * @author zwd
 *
 */
public class ParallelClauseAnalyzeContext extends AnalyzeContext{

	private ParallelClauseContext context;
	
	@Override
	public void setParseContext(ParseContext parseContext) {
		context = (ParallelClauseContext) parseContext;
	}

	@Override
	public void validateParseContext() throws SemanticAnalyzerException {
		ConstUtils.formatInt(context.getNumber());
	}

	@Override
	public List<Schema> getCreatedSchemas() {
		return null;
	}

	@Override
	public String toString() {
		return context.toString();
	}
	public Integer getParallelNumber(){
		return Integer.valueOf(context.getNumber());
	}

}
